home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE12 / CONSTRUC / UNIT1.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1996-07-17  |  1.2 KB  |  58 lines

  1. unit Unit1;
  2. interface
  3. uses
  4.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  5.   Forms, Dialogs, Menus, Grids, TBHEXVU, TBHEXED;
  6.  
  7. type
  8.   TForm1 = class(TForm)
  9.     HexEditor: TBHexEditor;
  10.     MainMenu1: TMainMenu;
  11.     File1: TMenuItem;
  12.     Help1: TMenuItem;
  13.     Open1: TMenuItem;
  14.     Close1: TMenuItem;
  15.     N1: TMenuItem;
  16.     Exit1: TMenuItem;
  17.     About1: TMenuItem;
  18.     OpenDialog: TOpenDialog;
  19.     procedure Open1Click(Sender: TObject);
  20.     procedure Close1Click(Sender: TObject);
  21.     procedure Exit1Click(Sender: TObject);
  22.     procedure About1Click(Sender: TObject);
  23.   private
  24.     { Private declarations }
  25.   public
  26.     { Public declarations }
  27.   end;
  28.  
  29. var
  30.   Form1: TForm1;
  31.  
  32. implementation
  33. {$R *.DFM}
  34.  
  35. procedure TForm1.Open1Click(Sender: TObject);
  36. begin
  37.   if OpenDialog.Execute then
  38.     HexEditor.FileName := OpenDialog.FileName
  39. end;
  40.  
  41. procedure TForm1.Close1Click(Sender: TObject);
  42. begin
  43.   HexEditor.FileName := ''
  44. end;
  45.  
  46. procedure TForm1.Exit1Click(Sender: TObject);
  47. begin
  48.   Close
  49. end;
  50.  
  51. procedure TForm1.About1Click(Sender: TObject);
  52. begin
  53.   MessageDlg('Welcome to Dr.Bob''s TBHexViewer and TBHexEditor...',
  54.               mtInformation, [mbOk], 0)
  55. end;
  56.  
  57. end.
  58.